package com.itheima.mall.service.sms;

import com.itheima.mall.api.sms.CouponHistoryServiceApi;
import com.itheima.mall.pojo.sms.Coupon;
import com.itheima.mall.pojo.sms.CouponHistory;
import com.itheima.mall.vo.PageResult;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CouponHistoryService {
    @DubboReference
    private CouponHistoryServiceApi couponHistoryServiceApi;
    //根据优惠券id，使用状态，订单编号分页获取领取记录
    public PageResult list(Integer couponId, String orderSn, Integer pageNum, Integer pageSize, Integer userStatus) {
        PageResult<CouponHistory> pr = couponHistoryServiceApi.list(couponId, orderSn, pageNum, pageSize, userStatus);
        return pr;
    }
}
